//数组获取最值
import java.sql.SQLOutput;
import java.util.Scanner;
public class test_01 {
    public static void main(String[] args) {
        int arr [] = {12,9,26,64,35,98};
        int max = getMax(arr);
        int min = getMin(arr);
        System.out.println(arr.length);
        System.out.println(max);
        System.out.println(min);
    }

    public static int getMax(int [] arr) {
        int max = arr[0];
        for(int i = 0;i < arr.length;i++){
            if(arr[i] >max){
                max = arr[i];
            }
        }
        return max;
    }
    public static int getMin(int [] arr){
        int min = arr[0];
        for(int i = 0;i <arr.length;i++){
            if(arr[i]<min){
                min = arr[i];
            }
        }
        return min;
    }

}
